@@ -15,7 +15,7 @@ class SaleclerkIntegralIncomeExpensesInfoAdmin(ReadOnlyModelAdmin, admin.ModelAd |
||
15 | 15 |
|
16 | 16 |
class SaleclerkSubmitLogInfoAdmin(AdvancedExportExcelModelAdmin, ReadOnlyModelAdmin, admin.ModelAdmin): |
17 | 17 |
list_display = ('clerk_id', 'clerk_name', 'model_name', 'model_uni_name', 'distributor_name', 'code', 'has_scan', 'remark', 'dupload', 'ymd', 'trackingNo', 'is_wxwork', 'is_staff_delete', 'status', 'created_at', 'updated_at') |
18 |
- list_filter = ('brand_pk', 'dupload', 'test_user', 'test_sn', 'has_scan', 'is_wxwork', 'is_staff_delete', 'status', 'created_at', 'remark') |
|
18 |
+ list_filter = ('brand_pk', 'dupload', 'test_user', 'test_sn', 'has_scan', 'is_wxwork', 'is_staff_delete', 'is_upload_qiniu', 'status', 'created_at', 'remark') |
|
19 | 19 |
excel_fields = ('created_at', 'distributor_name', 'clerk_name', 'model_uni_name', 'model_name', 'code', 'has_scan', 'remark') |
20 | 20 |
search_fields = ('code', 'trackingNo', 'distributor_name', 'clerk_name', 'model_name', 'model_uni_name') |
21 | 21 |
|
@@ -6,6 +6,7 @@ from django_models_ext import BaseModelMixin, upload_path, upload_file_path, upl |
||
6 | 6 |
from TimeConvert import TimeConvert as tc |
7 | 7 |
|
8 | 8 |
from mch.models import ModelInfo |
9 |
+from utils.qiniucdn import qiniu_file_url |
|
9 | 10 |
|
10 | 11 |
|
11 | 12 |
class SaleclerkIntegralIncomeExpensesInfo(BaseModelMixin): |
@@ -135,15 +136,15 @@ class SaleclerkSubmitLogInfo(BaseModelMixin): |
||
135 | 136 |
|
136 | 137 |
@property |
137 | 138 |
def image_url(self): |
138 |
- return upload_file_url(self.image) |
|
139 |
+ return qiniu_file_url(self.image.name, bucket='tamron') if self.is_upload_qiniu else upload_file_url(self.image) |
|
139 | 140 |
|
140 | 141 |
@property |
141 | 142 |
def code_image_path(self): |
142 |
- return upload_file_path(self.image) |
|
143 |
+ return upload_file_path(self.code_image) |
|
143 | 144 |
|
144 | 145 |
@property |
145 | 146 |
def code_image_url(self): |
146 |
- return upload_file_url(self.image) |
|
147 |
+ return qiniu_file_url(self.code_image.name, bucket='tamron') if self.is_upload_qiniu else upload_file_url(self.code_image) |
|
147 | 148 |
|
148 | 149 |
@property |
149 | 150 |
def admindata(self): |
@@ -256,7 +256,7 @@ QINIU = { |
||
256 | 256 |
'thumbnail': 'http://thumbnail.img.pai.ai', |
257 | 257 |
'thumbnail2': 'http://thumbnail2.img.pai.ai', |
258 | 258 |
'watermark': 'http://watermark.img.pai.ai', |
259 |
- 'tamron': 'tamron.s3-cn-south-1.qiniucs.com', |
|
259 |
+ 'tamron': 'http://qbmivthwi.bkt.clouddn.com', |
|
260 | 260 |
} |
261 | 261 |
} |
262 | 262 |
|